I am having the same issue, and the number of crashes are increasing, @ Apple please fix the bug as soon as possible
Post
Replies
Boosts
Views
Activity
Thank you @endecotp for your reply, Currently I am using SwiftyStoreKit to handle In-App Purchases.
To make the In-App Purchase, I am calling SwiftyStoreKit's purchaseProduct(_ product: SKProduct) method,
And once I get the success response from this method, I am validating the receipt to validate the purchase by this SwiftyStoreKit's verifyReceipt(using validator: ReceiptValidator) method,
Which first fetches the appStoreReceiptData from the Bundle as below,
var appStoreReceiptData: Data? {
guard let receiptDataURL = Bundle.main.appStoreReceiptURL,
let data = try? Data(contentsOf: receiptDataURL) else {
return nil
}
return data
}
Then to validate the receipt data, calls the verifyReceipt endpoint https://buy.itunes.apple.com/verifyReceipt as below,
let storeURL = URL(string: "https://buy.itunes.apple.com/verifyReceipt")!
let storeRequest = NSMutableURLRequest(url: storeURL)
storeRequest.httpMethod = "POST"
let receipt = appStoreReceiptData.base64EncodedString(options: [])
let requestContents: NSMutableDictionary = [ "receipt-data": receipt ]
// password if defined
if let password = sharedSecret {
requestContents.setValue(password, forKey: "password")
}
// Encore request body
do {
storeRequest.httpBody = try JSONSerialization.data(withJSONObject: requestContents, options: [])
} catch let e {
completion(.error(error: .requestBodyEncodeError(error: e)))
return
}
// Remote task
let task = URLSession.shared.dataTask(with: storeRequest as URLRequest) { data, _, error -> Void in
}
task.resume()
And once I got the successful validation response from the above method, I unlock the pro content for the user in the application.
Can you please let me know how can I know that how I am validating the certificate?
Also, can you please check the above things, and let me know if I still needs any changes on receipt validation?
Thanks again.
Thank you both of you for the reply, I have got your point that I am sending the receipt to Apple for validation, and this change will not affect my application.
This is very helpful to me.
As I see this documentation Validating receipts with the App Store,
It is saying that
The verifyReceipt endpoint is deprecated
So Is there any end date from which this endpoint will not work?
What should I do?
Should I continue using the verifyReceipt endpoint from the device?
Or
Should I plan to use the verifyReceipt endpoint from my server?
Or
Should I plan to use the App Store Server API and App Store Server Notifications V2?
Can you please share your feedback on this?
Yes, my app relies on having an internet connection while it is running.
But my concern here is that,
Should I continue using the verifyReceipt endpoint from the device?
Or
Should I plan to use the verifyReceipt endpoint from my server?
Or
Should I plan to use the App Store Server API and App Store Server Notifications V2?
Thank you @endecotp for such useful feedback on my queries, it really means a lot to me.
@App Store Commerce Engineer Is there anything you can suggest about it? It would be very helpful.